<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Jumpserver</title>
<link rel="shortcut icon" type="image/x-icon" href="" />
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!--[if lt IE 9]>
	<script src="http://html5shim.googlecode.com/svn/trunk/html5js"></script>
<![endif]-->
<link href="/static/css/bootstrap.css" rel="stylesheet">
    <link href="/static/css/bootstrap-dialog.css" rel="stylesheet">
<link href="/static/css/main.css" rel="stylesheet">


<script src="/static/js/jquery.min.js"></script>

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="/static/js/bootstrap.min.js"></script>
<script src="/static/js/bootstrap-dialog.js"></script>

<script src="/static/js/main.js"></script>

</head>

<body>
{% if not admin %}
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
  <div class="navbar-header"> <a class="navbar-brand" href="#">Jumpserver</a> </div>
  <div class="collapse navbar-collapse">
    <ul class="nav navbar-nav">
      <li class="{{ index }}"><a href="/">主页</a></li>
      <li class="{{ pass_menu }}"><a href="/chgPass/">密码管理</a></li>
      <!--<li><a href="#">命令执行</a></li>-->
    </ul>
    <div class="btn-group navbar-right">
       <button type="button" class="btn btn-primary dropdown-toggle session_btn" data-toggle="dropdown">
         {{ name }}<span class="caret"></span>
       </button>
       <ul class="dropdown-menu dropdown-logout">
         <li class="dropdown-logout"><a href="/chgPass/">修改密码</a></li>
         <li class="dropdown-logout"><a href="/logout/">退出</a></li>
       </ul>
    </div>
  </div>
</nav>
<div class="container">
<div class="row row-offcanvas row-offcanvas-right">
  <div class="col-xs-12 col-sm-3 sidebar-offcanvas" id="sidebar" role="navigation">
    <div class="row">
      <div class="col-md-12">
        <div class="row>
		<!--Sidebar content-->
		<div class="sidebar-menu">
          <div class="menu-first" ><a href="#userMenu" data-toggle="collapse">
              <i class="glyphicon glyphicon-th"></i> 密码管理</a>
          </div>
          <ul id="userMenu" class="nav nav-list navbar-collapse.in menu-second">
            <li><a href="/chgPass/"><i class="glyphicon glyphicon-send"></i> 登陆密码</a></li>
            <li><a href="/chgKey/"><i class="glyphicon glyphicon-send"></i> 密钥密码</a></li>
          </ul>

          <div class="menu-first" ><a href="#fileMenu" data-toggle="collapse">
              <i class="glyphicon glyphicon-th"></i> 文件传输</a>
          </div>
          <ul id="fileMenu" class="nav nav-list navbar-collapse.in menu-second">
            <li><a href="/upFile/"><i class="glyphicon glyphicon-send"></i> 上传文件</a></li>
            <li><a href="/downFile/"><i class="glyphicon glyphicon-send"></i> 下载文件</a></li>
          </ul>


        </div>
      </div>
    </div>
  </div>
{% else %}
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
  <div class="navbar-header"> <a class="navbar-brand" href="#">Jumpserver</a> </div>
  <div class="collapse navbar-collapse">
    <ul class="nav navbar-nav">
      <li class="{{ index }}"><a href="/">主页</a></li>
      <li class="{{ user_menu }}"><a href="/showUser/">用户管理</a></li>
      <!--<li><a href="#">命令执行</a></li>-->
      <li class="{{ asset_menu }}"><a href="/showAssets/">主机管理</a></li>
      <li class="{{ perm_menu }}"><a href="/showPerm/">权限管理</a></li>
    </ul>
    <div class="btn-group navbar-right">
       <button type="button" class="btn btn-primary dropdown-toggle session_btn" data-toggle="dropdown">
         {{ name }}<span class="caret"></span>
       </button>
       <ul class="dropdown-menu dropdown-logout">
         <li class="dropdown-logout"><a href="/chgPass/">修改密码</a></li>
         <li class="dropdown-logout"><a href="/logout/">退出</a></li>
       </ul>
    </div>
  </div>
</nav>
<div class="container">
<div class="row row-offcanvas row-offcanvas-right">
  <div class="col-xs-12 col-sm-3 sidebar-offcanvas" id="sidebar" role="navigation">
    <div class="row">
      <div class="col-md-12">
        <div class="row>
		<!--Sidebar content-->
		<div class="sidebar-menu">
          <div class="menu-first" ><a href="#userMenu" data-toggle="collapse"><i class="glyphicon glyphicon-th"></i> 用户管理</a></div>
          <ul id="userMenu" class="nav nav-list navbar-collapse.in menu-second">
            <li><a href="/showUser/"><i class="glyphicon glyphicon-send"></i> 查看用户</a></li>
            <li><a href="/addUser/"><i class="glyphicon glyphicon-send"></i> 添加用户</a></li>
          </ul>
          <!--<div class="menu-first" ><a href="#monitorMenu" data-toggle="collapse"><i class="glyphicon glyphicon-th"></i> 执行命令</a></div>
          <ul id="monitorMenu" class="nav nav-list navbar-collapse.in menu-second">
            <li><a href="/runCommand/"><i class="glyphicon glyphicon-send"></i> 执行命令</a></li>
            <li><a href="/addServer/"><i class="glyphicon glyphicon-send"></i> 添加主机</a></li>
            <li><a href="/showServer/"><i class="glyphicon glyphicon-send"></i> 查看主机</a></li>
          </ul>-->
          <div class="menu-first" ><a href="#hostMenu" data-toggle="collapse"><i class="glyphicon glyphicon-th"></i> 主机管理</a></div>
          <ul id="hostMenu" class="nav nav-list navbar-collapse menu-second">
            <li><a href="/showAssets/"><i class="glyphicon glyphicon-send"></i> 主机列表</a></li>
            <li><a href="/addAssets/"><i class="glyphicon glyphicon-send"></i> 添加主机</a></li>
          </ul>
          <div class="menu-first" ><a href="#permMenu" data-toggle="collapse"><i class="glyphicon glyphicon-th"></i> 主机权限</a></div>
          <ul id="permMenu" class="nav nav-list navbar-collapse menu-second">
            <li><a href="/showPerm/"><i class="glyphicon glyphicon-send"></i> 查看权限</a></li>
            <li><a href="/addPerm/"><i class="glyphicon glyphicon-send"></i> 添加权限</a></li>
          </ul>
          <div class="menu-first" ><a href="#logMenu" data-toggle="collapse"><i class="glyphicon glyphicon-th"></i> 日志审计</a></div>
          <ul id="logMenu" class="nav nav-list navbar-collapse menu-second">
            <li><a href="/logView/"><i class="glyphicon glyphicon-send"></i> 查看日志</a></li>
          </ul>
         <div class="menu-first" ><a href="#fileMenu" data-toggle="collapse">
              <i class="glyphicon glyphicon-th"></i> 文件传输</a>
          </div>
          <ul id="fileMenu" class="nav nav-list navbar-collapse.in menu-second">
            <li><a href="/upFile/"><i class="glyphicon glyphicon-send"></i> 上传文件</a></li>
            <li><a href="/downFile/"><i class="glyphicon glyphicon-send"></i> 下载文件</a></li>
          </ul>
        </div>
      </div>
    </div>
  </div>

{% endif %}
  <div class="col-xs-12 col-sm-9">
    <div class="screen">
	{% block content %}{% endblock %}
    </div>
  </div>

</div>
</body>
</html>
